package com.xmu.prcs.dao.impl;

import java.util.List;

import com.xmu.prcs.dao.PartDao;
import com.xmu.prcs.entity.Part;

/**
 * 
 * @author frequent
 * @version 1.0,2012-3-20
 *
 */
public class PartDaoImpl extends GenericDaoImpl<Part> implements PartDao{

	public PartDaoImpl() {
		super(Part.class);
	}

	public List<Part> getPartOfLevelTwo() {
		List<Part> parts = null;
		String hql = " from Part as model where model." + PartDao.IS_TWO_LEVEL + "=? order by model.idPart";
		parts = this.getHibernateTemplate().find(hql, 1);
		return parts;
	}

}
